<?php

echo '<div class="add_dvd_container">';
echo form_open_multipart('admin/add_dvd');


/*
$this->table->add_row('DVD Title', form_input('dvd_title', $this->input->post('dvd_title')));
$this->table->add_row('DVD Price', form_input('dvd_price', $this->input->post('dvd_price')));
$this->table->add_row('DVD Cover Image', form_upload('dvd_cover'));
$this->table->add_row(array(
	'data' => form_submit('add_dvd_submit', 'Add DVD'),
	'colspan' => 2
));

$tmpl = array(
	'table_open' => '<table class="add_dvd_table">'
);
$this->table->set_template($tmpl);

echo $this->table->generate();
*/
?>

<table class="add_dvd_table">
	<tr>
	<td>DVD Title</td>
	<td>
		<?php
		echo form_error('dvd_title');
		echo form_input('dvd_title', $this->input->post('dvd_title'));
		?>
	</td>
	</tr>
	<tr>
	<td>DVD Price</td>
	<td>
		<?php
		echo form_error('dvd_price');
		echo form_input('dvd_price', $this->input->post('dvd_price'));
		?>
	</td>
	</tr>
	<tr>
	<td>DVD Cover Image</td>
	<td>
		<?php
		echo form_error('dvd_cover');
		echo $this->upload->display_errors('<div class="form_error">', '</div>');
		echo form_upload('dvd_cover');
		?>
	</td>
	</tr>
	<tr>
	<td colspan='2'><?php echo form_submit('add_dvd_submit', 'Add DVD'); ?></td>
	</tr>
</table>


<?php
echo form_close();
echo '</div>';